VB.NET CODE -->Read & write a Single Line in a File (Simple Code)If you searching a Easy way of Wri
VB.NET CODE -->Read & write a Single Line in a File (Simple Code)If you searching a Easy way of Writing/Reading a File.Your Search ends here!!!
API Declarations
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Rate VB.NET CODE -->Read & write a Single Line in a File (Simple Code)If you searching a Easy way of Wri
(1(1 Vote))
fso.CreateTextFile("test1.txt") ' Create a file.
f = fso.GetFile("C:\test1.txt")
ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
ts.Write("Hello World")
ts.Close()
ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
s = ts.ReadLine()
ts.Close()
MsgBox(s)
VB.NET CODE -->Read & write a Single Line in a File (Simple Code)If you searching a Easy way of Wri Comments
No comments yet — be the first to post one!
Post a Comment